home *** CD-ROM | disk | FTP | other *** search
-
- /*
- File: FontLibrary.h
-
- Contains: graphics libraries - font library interfaces
-
- Written by: Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <1> 1/9/95 JD First checked in.
- */
-
- #ifndef __FONTLIBRARY__
- #define __FONTLIBRARY__
-
- #include <GXTypes.h>
- #include <GXFonts.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* for compatibility with old headers */
- #define fontLibraryIncludes
-
- /* example gxFont descriptor tags
- */
- #define weightVariationTag 0x77676874 /* 'wght' */
- #define widthVariationTag 0x77647468 /* 'wdth' */
- #define slantVariationTag 0x736c6e74 /* 'slnt' */
- #define opticalScaleVariationTag 0x6f70737a /* 'opsz' */
-
- /* weights for gxStyle matching */
- /* these will have to be tweaked*/
- /* this info could be in the gxFont???*/
- #define prefwghtweighting 0x00010000
- #define prefwdthweighting 0x00020000
- #define prefslntweighting 0x00010000 /*this is naturally weighted to last place*/
- #define prefcontweighting 0x00040000
-
- enum commonFonts {
- firstCommonFont,
- chicagoFont = firstCommonFont,
- courierFont,
- genevaFont,
- helveticaFont,
- monacoFont,
- newyorkFont,
- symbolFont,
- timesFont,
- lastCommonFont = timesFont
- };
-
- typedef long commonFont;
-
- enum matchingStyles {
- noMatching = 0,
- useStyleMatching,
- useVariationsMatching,
- useTextFaceMatching= 4
- };
-
- typedef long matchingStyle;
-
- gxFont GetCommonFont(commonFont font);
- void SetShapeCommonFont(gxShape target, commonFont font);
- void SetStyleCommonFont(gxStyle target, commonFont font);
-
- gxFont FindCNameFont(gxFontName meaning, const char name[]);
- gxFont FindPNameFont(gxFontName meaning, const unsigned char name[]);
-
- long FindFontCName(gxFont fontID, gxFontName meaning, char name[]);
- long FindFontPName(gxFont fontID, gxFontName meaning, unsigned char name[]);
-
- long FindStyleFontCName(gxStyle source, gxFontName meaning, char name[]);
- long FindStyleFontPName(gxStyle source, gxFontName meaning, unsigned char name[]);
- void SetStylePNamedFont(gxStyle target, const unsigned char name[]);
- void SetStyleCNamedFont(gxStyle target, const char* name);
-
- long CountFontFamilies(void);
- gxFont FindFontFamily(long index, gxFontPlatform platform, gxFontScript script, gxFontLanguage language,
- long nameLength, const unsigned char *name);
- long CountFontStyles(gxFont family);
- gxFont FindFontStyle(gxFont family, long index, gxFontPlatform platform, gxFontScript script, gxFontLanguage language,
- long nameLength, const unsigned char *name);
-
- void SetMatchingStyle(gxFont targetFamily, gxStyle theStyle, matchingStyle matchInfo);
- gxStyle ReturnMatchingStyle(gxFont targetFamily, gxStyle theStyle, matchingStyle matchInfo);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __FONTLIBRARY__ */
-